<?php
require_once '../../mainfile.php';
require_once "pre.inc.php";

if (isset($_COOKIE['xoops_junktv']) && 1 <= intval($_COOKIE['xoops_junktv']) && intval($_COOKIE['xoops_junktv']) <= 47) {
	xoops_tv_resetcookie();
	$id = intval($_COOKIE['xoops_junktv']);
} else {
	$id = 8;
} 

$xoopsOption['template_main'] = 'tv_index.html';
include XOOPS_ROOT_PATH . "/header.php";

require JUNKTV_BASE . '/lib/areadata.inc.php';

$xoopsTpl->assign("id", $id);
$xoopsTpl->assign("area", $area);

include XOOPS_ROOT_PATH . "/footer.php";

?>